//
//  ShufflingCollectionViewCell.m
//  Food
//
//  Created by 15 on 15/7/14.
//  Copyright (c) 2015年 李志远. All rights reserved.
//

#import "ShufflingCollectionViewCell.h"
#import "BaseHeader.h"
@implementation ShufflingCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.threeView = [[[UIView alloc] init] autorelease];
        self.contentView.backgroundColor = [UIColor whiteColor];
        self.contentView.layer.cornerRadius = 10;
        [self.contentView addSubview:self.threeView];
        self.imgBtn = [[[UIImageView alloc] init] autorelease];
        self.imgBtn.backgroundColor = [UIColor whiteColor];
        [self.threeView addSubview:self.imgBtn];
        self.lblBtn = [[[UILabel alloc] init] autorelease];
        self.lblBtn.backgroundColor = [UIColor whiteColor];
        [self.threeView addSubview:self.lblBtn];
    }
    return self;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    self.threeView.frame = CGRectMake(0, 0, 80, 100);
    self.imgBtn.frame = CGRectMake(5, 5, 70, 70);
    self.lblBtn.frame = CGRectMake(10, 76, 60, 20);
    self.lblBtn.textAlignment = NSTextAlignmentCenter;
    self.lblBtn.textColor = [UIColor lightGrayColor];

}

- (void)setShuffModel:(shufflingModel *)shuffModel
{
    if (_shuffModel != shuffModel) {
        [_shuffModel release];
        _shuffModel = [shuffModel retain];
    }
    self.lblBtn.text = _shuffModel.title;
    self.imgBtn.image = [UIImage imageNamed:_shuffModel.pic];
}



- (void)pushToNextControllerWithIDName:(NSString *)name
{

}






@end
